module.exports = (app) => {
  const { router, controller, middleware } = app;
  const subRouter = router.namespace("/notice");
  const auth = middleware.authToken();

  subRouter.get("/index", auth, controller.notice.index);
  subRouter.post("/createNotice", auth, controller.notice.createNotice);
  subRouter.post("/getNoticeList", auth, controller.notice.getNoticeList);
  subRouter.post(
    "/getNoticeListByNoticeTitle",
    auth,
    controller.notice.getNoticeListByNoticeTitle
  );
  subRouter.post("/updateNotice", auth, controller.notice.updateNotice);
  subRouter.get("/deleteNotice", auth, controller.notice.deleteNotice);
};
